# -*- coding: utf-8 -*-
import requests
import lxml.html
from bs4 import BeautifulSoup
import re
header={
        'User-Agent': 'Chrome/94.0.4606.61 Safari/537.36'}

#下载歌曲，找到正确的url
url='http://music.163.com/song/media/outer/url?id=1871592200'
song=requests.get(url,headers=header)
with open('exile.mp3','wb') as f:
    f.write(song.content)
#下载mv
vu='https://vodkgeyttp8.vod.126.net/cloudmusic/MSMmMmIiMCJhYTAhIjAwMA==/mv/113112/980678c46981df25bcb88baaa33e7f70.mp4?wsSecret=320d02976f1153f40e2b7ebcdd8e95c7&wsTime=1634669246'
vid=requests.get(vu,headers=header)
with open('Red.mp4','wb+') as f:
    f.write(vid.content)

